import 'package:flutter/material.dart';

class InkButton extends StatelessWidget {
  InkButton({
    required this.child,
    this.width,
    this.height,
    this.onTap,
    this.radius = 0,
    this.color,
    this.boxShadow,
    this.border,
    this.elevation,
  });

  final Widget child;
  final Function()? onTap;
  final double radius;
  final Color? color;
  final Border? border;
  final double? width;
  final double? height;
  final double? elevation;
  final List<BoxShadow>? boxShadow;

  @override
  Widget build(BuildContext context) {
    return Material(
      color: color,
      elevation: elevation ?? 4,
      shape: RoundedRectangleBorder(
        borderRadius: BorderRadius.circular(radius),
      ),
      // borderRadius: BorderRadius.circular(radius),

      child: InkWell(
        onTap: onTap,
        borderRadius: BorderRadius.circular(radius),
        child: Container(
          alignment: Alignment.center,
          width: width,
          height: height,
          child: child,
        ),
      ),
    );
  }
}
